﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class 用户 : System.Web.UI.Page
{
    private static string sqlconn = System.Configuration.ConfigurationManager.AppSettings["sqlcon"].ToString().Trim();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Binddate();
            gvProduct.Visible = true;
        }
    }
    protected void Binddate()
    {
        users us = new users();
        gvProduct.DataSource = us.GetAll(us);
        gvProduct.DataBind();
    }
   
    protected void gvProduct_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        gvProduct.PageIndex = e.NewPageIndex;
        Binddate();  //调用自定义方法Bind()
    }
}